#!/usr/bin/env python
#coding=utf-8

class NoDataToday(Exception):
    def __init__(self, date, code):
        self.date = date
        self.code = code
        
    def __str__(self):
        t = "%s; %s: No Data Today."%(self.date, self.code)
        return t
    
class NoHistData(Exception):
    def __init__(self, code):
        self.code = code
        
    def __str__(self):
        t = "%s: No history Data .\n"%self.code
        return t    

class NoPrice(Exception):
    def __init__(self, code, date_isostr):
        self.date = date_isostr
        self.code = code
    def __str__(self):
        t = "%s; %s: No Price Data."%(self.date, self.code)
        return t

class NoPreDay(Exception):
    def __init__(self, code, date_isostr):
        self.date = date_isostr
        self.code = code
    def __str__(self):
        t = "%s; %s: No Previous Day Data.May it is the first day"%(self.date, self.code)
        return t
